<!DOCTYPE html>
<html>
<head>
	<title>后台管理</title>
	<script src="//cdn.bootcss.com/jquery/1.12.4/jquery.min.js"></script>
	<link rel="stylesheet" type="text/css" href="../bower_components/bootstrap/dist/css/bootstrap.css">
	<script src="/bower_components/bootstrap/dist/js/bootstrap.js"></script>
	<link rel="stylesheet" type="text/css" href="../stylesheets/admin.css">
	<script type="text/javascript" src="../bower_components/kindeditor/kindeditor-min.js"></script>
	<script type="text/javascript" src="../bower_components/kindeditor/lang/zh-CN.js"></script>
	<script type="text/javascript" src="/bower_components/upload-jquery/jquery.upload.js"></script>
</head>
<body>
	<div class="container">
		<div class="row">
			<div class="col-md-8 col-md-offset-2">
				<h4 class="page-header"><a href="/admin">>>返回</a>&nbsp;&nbsp;&nbsp;&nbsp;数据管理</h4>
				
				<form action="addArticle" method="post">

				<%if(tErr!=""){%>
					<div class="alert alert-danger" role="alert">
						<%= tErr%>
						<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
					</div>
				<%}%>
					<div class="form-group" data-container="body" data-toggle="popover" data-placement="right" data-content="必填项">
						<label>标题</label>
						<div class="row">
							<div class="col-md-10"><input type="text" name="title" class="form-control" placeholder="请输入标题"></div>
							<span class="sign col-md-2">＊必填项</span>
						</div>
					</div>

				<%if(contErr!=""){%>
					<div class="alert alert-danger" role="alert">
						<%= contErr%>
						<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
					</div>
				<%}%>
					<div class="form-group">
						<label>文章内容</label>
						<textarea name="content"></textarea>
					</div>
					<button id="submit" type="submit" class="btn btn-info btn-lg">提交</button>
				</form>
			</div>
		</div>
	</div>
</body>
</html>
<script type="text/javascript">
	var editor;
	KindEditor.ready(function(K) {
		editor = K.create('textarea[name="content"]', {
			allowFileManager : true
		});
	});

	setTimeout(function(){
		$('.alert').fadeOut(2000);
	},2000)

</script>